let arr = [2, 6, 9, 1, 3]

arr.sort((x, y) => {
  return x - y
})

console.log(arr);